<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 *      [PinTuXiu] (C)2001-2099 ONightjar.com Pintuxiu.com.
 *      This is NOT a freeware, use is subject to license terms
 */

class up20131020_api {
	
	public function execute($page,$numperpage){
		$sharedb = load_db('share');
		
		$shares = $sharedb->search(null,$page,$numperpage," ptx_share.share_id,ptx_share.create_time ",NULL);
		
		foreach ($shares as $share){
			$sharedb->update(array('share_id'=>$share['share_id']),array('lastcomment_time'=>$share['create_time']));
		}
		
		if(array_length($shares)>0){
			return true;
		}
		
		load_api('category')->check_totalshare();
		return false;
	}
	
}

